package com.wbcs.config.dataexport;

import com.wbcs.config.Config;
import com.wbcs.config.component.IComponentConfigBean;
import com.wbcs.config.xml.XmlElementBean;

public class PlainExcelExportBean extends AbsDataExportBean
{
    private String plainexceltitle="label";

    private int plainexcelsheetsize;

    public PlainExcelExportBean(IComponentConfigBean owner,String type)
    {
        super(owner,type);
    }

    public String getPlainexceltitle()
    {
        return plainexceltitle;
    }

    public void setPlainexceltitle(String plainexceltitle)
    {
        this.plainexceltitle=plainexceltitle;
    }

    public int getPlainexcelsheetsize()
    {
        return plainexcelsheetsize;
    }

    public void setPlainexcelsheetsize(int plainexcelsheetsize)
    {
        this.plainexcelsheetsize=plainexcelsheetsize;
    }

    @Override
	public void loadConfig(XmlElementBean eleDataExport)
    {
        super.loadConfig(eleDataExport);
        String plainexceltitle=eleDataExport.attributeValue("plainexceltitle");
        String sheetsize=eleDataExport.attributeValue("sheetsize");
        if(plainexceltitle!=null)
        {
            this.plainexceltitle=plainexceltitle.toLowerCase().trim();
        }
        if(sheetsize!=null&&!sheetsize.trim().equals(""))
        {
            this.plainexcelsheetsize=Integer.parseInt(sheetsize.trim());
        }else
        {
            this.plainexcelsheetsize=Config.getInstance().getPlainexcelSheetsize();
        }
    }

}
